package com.ruoyi.fs.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fs.mapper.FsCaseRepaymentSchedulePayMapper;
import com.ruoyi.fs.domain.FsCaseRepaymentSchedulePay;
import com.ruoyi.fs.service.IFsCaseRepaymentSchedulePayService;

/**
 * 还款计划支付Service业务层处理
 * 
 * @author hero
 * @date 2024-11-18
 */
@Service
public class FsCaseRepaymentSchedulePayServiceImpl implements IFsCaseRepaymentSchedulePayService 
{
    @Autowired
    private FsCaseRepaymentSchedulePayMapper fsCaseRepaymentSchedulePayMapper;

    /**
     * 查询还款计划支付
     * 
     * @param id 还款计划支付主键
     * @return 还款计划支付
     */
    @Override
    public FsCaseRepaymentSchedulePay selectFsCaseRepaymentSchedulePayById(Long id)
    {
        return fsCaseRepaymentSchedulePayMapper.selectFsCaseRepaymentSchedulePayById(id);
    }

    /**
     * 查询还款计划支付列表
     * 
     * @param fsCaseRepaymentSchedulePay 还款计划支付
     * @return 还款计划支付
     */
    @Override
    public List<FsCaseRepaymentSchedulePay> selectFsCaseRepaymentSchedulePayList(FsCaseRepaymentSchedulePay fsCaseRepaymentSchedulePay)
    {
        return fsCaseRepaymentSchedulePayMapper.selectFsCaseRepaymentSchedulePayList(fsCaseRepaymentSchedulePay);
    }

    /**
     * 新增还款计划支付
     * 
     * @param fsCaseRepaymentSchedulePay 还款计划支付
     * @return 结果
     */
    @Override
    public int insertFsCaseRepaymentSchedulePay(FsCaseRepaymentSchedulePay fsCaseRepaymentSchedulePay)
    {
        fsCaseRepaymentSchedulePay.setCreateTime(DateUtils.getNowDate());
        return fsCaseRepaymentSchedulePayMapper.insertFsCaseRepaymentSchedulePay(fsCaseRepaymentSchedulePay);
    }

    /**
     * 修改还款计划支付
     * 
     * @param fsCaseRepaymentSchedulePay 还款计划支付
     * @return 结果
     */
    @Override
    public int updateFsCaseRepaymentSchedulePay(FsCaseRepaymentSchedulePay fsCaseRepaymentSchedulePay)
    {
        fsCaseRepaymentSchedulePay.setUpdateTime(DateUtils.getNowDate());
        return fsCaseRepaymentSchedulePayMapper.updateFsCaseRepaymentSchedulePay(fsCaseRepaymentSchedulePay);
    }

    /**
     * 批量删除还款计划支付
     * 
     * @param ids 需要删除的还款计划支付主键
     * @return 结果
     */
    @Override
    public int deleteFsCaseRepaymentSchedulePayByIds(Long[] ids)
    {
        return fsCaseRepaymentSchedulePayMapper.deleteFsCaseRepaymentSchedulePayByIds(ids);
    }

    /**
     * 删除还款计划支付信息
     * 
     * @param id 还款计划支付主键
     * @return 结果
     */
    @Override
    public int deleteFsCaseRepaymentSchedulePayById(Long id)
    {
        return fsCaseRepaymentSchedulePayMapper.deleteFsCaseRepaymentSchedulePayById(id);
    }
}
